package com.xjy.headfirst.命令模式;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * decription:
 *
 * @author 辛纪元
 * @since 2022-07-07
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Stereo {

    private String name;

    public void on() {
        System.out.println("音箱开启");
    }


    public void off() {
        System.out.println("音箱关闭");
    }

    public void setCD() {
        System.out.println("设置CD咯");
    }

    public void setVolume(int i) {
        System.out.println("设置Volume:" + i);
    }

}
